package com.tanhua.server.service;

import com.tanhua.dubbo.api.mongo.UserLocationApi;
import com.tanhua.server.Interceptor.UserHolder;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

@Service
public class BaiduService {

    @Reference
    private UserLocationApi userLocationApi;

    //保存当前登录人的地理位置
    public ResponseEntity<Object> saveLocation(Double longitude,Double latitude, String addrStr) {

        //保存当前人的位置
        userLocationApi.saveLocation(UserHolder.getUserId(),longitude,latitude,addrStr);
        return ResponseEntity.ok(null);
    }
}
